package edu.unika.aifb.graphindex.searcher.keyword.model;

import java.util.HashSet;
import java.util.Set;

import edu.unika.aifb.graphindex.query.QNode;

public class KeywordQNode extends QNode {
	private static final long serialVersionUID = -2266479637820081283L;
	private Set<String> m_keywords;
	private KeywordElement keywordElement;
	
	public KeywordQNode(String label) {
		super(label);
		m_keywords = new HashSet<String>();
	}
	
	public Set<String> getKeywords() {
		return m_keywords;
	}
	
	public String toString() {
		if(keywordElement != null)
			return getLabel() + " "+ keywordElement.getUri() + " "+ keywordElement.entities.size() + " : " + keywordElement.getKeywordSegment();
		else
			return getLabel();
	}

	public void addKeyword(String keyword) {
		m_keywords.add(keyword);
	}
	
	public void setKeywords(Set<String> keywords){
		this.m_keywords = keywords;
	}
	
	public KeywordElement getKeywordElement() {
		return keywordElement;
	}

	public void setKeywordElement(KeywordElement keywordElement) {
		this.keywordElement = keywordElement;
	}
}
